Export from multiple modules

Hello.

I need a little push. I have this ideia: from a a module I do a filter based in one attribute, the objetcs that stay in the view after the filter would be used as a parameter for using a filter to another module (using the ID that they have in common). Then export it to a Excell document.

Is that possible? Someone have done that already?

As always I will try to find the answers here. If I get it I share it with you guys.

Thanks.


braolive - Tue Jun 18 13:19:11 EDT 2013

Re: Export from multiple modules
BillTidy - Tue Jun 18 13:57:33 EDT 2013

Not entirely sure what you're trying to do. Do you mean that you want to put a filter on objects in module A, then export from module B only the items linked to the objects in your current display set (the filtered objects) in A?

Re: Export from multiple modules
braolive - Tue Jun 18 14:18:49 EDT 2013

BillTidy - Tue Jun 18 13:57:33 EDT 2013

Not entirely sure what you're trying to do. Do you mean that you want to put a filter on objects in module A, then export from module B only the items linked to the objects in your current display set (the filtered objects) in A?

No.

The objects from my module B have same ID from the module A

So I wanna put a filter on the objects from module A, then export the objects from module A and  the objects of module B that have the same ID from the filtered objects  of module A.

 

Re: Export from multiple modules
llandale - Tue Jun 18 15:01:10 EDT 2013

Not sure I understand completely, but I suspect the following will "push" you over the hump.  Run the following from "B".

  • Module mB = current
  • Module mA = read(NameA, false, true)
  • load(mA, view("MySavedView_InA"))
  • Object oA, oB
  • Skip skpA = createString()
  •   // Note: mA is filtered so the following "for oA in mA" will show only those objects
  • for oA in mA do{put(skpA, identifier(oA), oA)
  • close(mA)
  • current = mB
  • filtering off
  • for oB in entire mB do
  • {  if (find(skpA, identifier(oB)) //
  •    then accept(oB)
  •    else reject(oB)
  • }
  • delete(skpA)
  • filtering on
  • Export

-Louie

Since it seems unrealist for module's A and B to share identifiers; (unless one is an "old" version of a copied "new" version); I'm guessing that you will want to put some attribute of oA in the Skip instead of identifier(oA).